import { SetMetadata } from '@nestjs/common';

export enum Role {
  User = 'user',
  Admin = 'admin',
  VISITOR = 'visitor',
}
// 自定义装饰器
// 权限装饰器
export const ROLES_KEY = 'RequireRole';
export const RequireRole = (...roles: Role[]) =>
  SetMetadata(ROLES_KEY, roles);
